package com.qianke.common;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

public class WebHelper {

    public static final Logger logger = LoggerFactory.getLogger(WebHelper.class);

    public static Map<String, Object> getRequestParam(HttpServletRequest request) {
        Map<String, Object> paramMap = new HashMap<String, Object>();
        Enumeration<String> enumeration = request.getParameterNames();
        while (enumeration.hasMoreElements()) {
            String key = enumeration.nextElement();
            String val = request.getParameter(key);

            paramMap.put(key, val);
        }
        return paramMap;
    }


}
